package org.qfedu.edu.auto;

import org.qfedu.edu.impl.JwtService;
import org.qfedu.edu.service.IJwtService;
import org.qfedu.edu.service.ITokenService;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * @author xiaobobo
 * @title: JwtServiceAutoConfiguration
 * @projectName seckill-fy-2401-parent
 * @description: Jwt的自动配置
 * @date 2024/11/4  14:28
 */
@SpringBootConfiguration
public class JwtServiceAutoConfiguration {


   @Bean
   @ConditionalOnMissingBean
   public IJwtService jwtService(ITokenService tokenService){
     IJwtService jwtService=new JwtService(tokenService);
     return jwtService;
   }


}
